Websites typically display text and static graphics through the use of the hypertext markup language (HTML). In order to add animation and interactivity to these websites, one approach is to use the Adobe® Shockwave Flash (SWF) file format from Adobe Systems Incorporated. Such files are most often played using the Adobe Flash® Player, or equivalent software or browser plugins, such as Gnash.
A shape definition in the SWF file format comprises a sequence of directed edges that each can have one line style index and a pair of fill style indices (one for the left side of the edge and one for the right side of the edge, relative to the forward direction of the edge). The fill style indices begin at index 1, with a value of 0 denoting the absence of an associated style.
One way of rendering SWF file shapes is to use a scan-line renderer, which can be very processor-intensive; this can be particularly problematic in the context of small handheld devices with resource limitations such as slower processing speeds and reliance on battery power. It would be desirable to use a vector graphics API (application program interface) to render SWF file shapes because of its potential to efficiently render graphics files of a suitable format. However, there are inherent incompatibilities between SWF shape definitions and the way that paths are specified for processing by a vector graphics API.
For example, if a vector graphics API-based renderer traverses the edges of a shape in the order specified in the SWF file, the resulting rendered image may not be the same as if rendered by the Flash player, or it may not be possible to render or convert.
One problem is that a SWF file can include a number of moveto statements. A vector graphics API interprets any moveto statement as an instruction to “close” a portion of a path that is being rendered for a given fill style, thereby causing a region of the screen to be filled with that fill style. This can result in incorrect rendering of a SWF shape definition.
Another problem is that vector graphics APIs do not allow multiple fill styles per edge, while this is permitted in the SWF file definition. So, when a vector graphics API encounters an edge with two fill styles, it may not be able to properly convert edges with two fill styles.
There are also certain inefficiencies involved in the rendering process after edge traversal.